package com.foryou.wechat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foryou.wechat.entity.InviteInfoEntity;
import com.foryou.wechat.model.vo.InviteInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Lee.
 */
@Mapper
@Repository
public interface InviteInfoMapper extends BaseMapper<InviteInfoEntity>{

    InviteInfoVo getInviteInfoVo(Long inviteId);

    List<InviteInfoVo> findReceiveInviteList(@Param("start") int start, @Param("userId") Long userId);

    List<InviteInfoVo> findSendInviteList(@Param("start") int start, @Param("userId") Long userId);

    int getInviteInfoCount(@Param("businessId") Long businessId,
                           @Param("fromUserId") Long fromUserId,
                           @Param("inviteType") int inviteType);

    InviteInfoEntity getFromUserLastedInfo(Long userId);

    InviteInfoEntity getToUserLastedInfo(Long userId);

}
